<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bootstrap.css">
    <script src="../js/jq-1.12.4.js"></script>
    <script src="../js/bootstrap.js"></script>
    <style>
        .list-group {
            width: 120px;
        }

        .glyphicon {
            color: #337AB7;
        }

        .list-group-item {
            text-align: center;
            cursor: pointer;
        }

        .list-group-item.active a,
        .list-group-item.active span {
            color: #fff;
        }

        .list-group-item span {
            margin-right: 8px;
        }
    </style>
</head>

<body>
    <div id="app" class="container">
        <ul class="list-group">
            <li class="list-group-item">
                <span class="glyphicon glyphicon-asterisk"></span>
                <a href="#">好友动态</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-glass"></span>
                <a href="#">特别关心</a>
            </li>
            <li class="list-group-item active">
                <span class="glyphicon glyphicon-music"></span>
                <a href="#">与我相关</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-user"></span>
                <a href="#">空间达人</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-play-circle"></span>
                <a href="#">那年今日</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-print"></span>
                <a href="#">企鹅辅导</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-eye-close"></span>
                <a href="#">游戏应用</a>
            </li>
            <li class="list-group-item">
                <span class="glyphicon glyphicon-plane"></span>
                <a href="#">我的收藏</a>
            </li>
        </ul>
    </div>
</body>
<script>
    $(function () {
        $(".list-group-item").on("click mouseover", function () {
            $(this).siblings().removeClass("active").end().addClass('active')
        })
    })
</script>

</html>